Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Javalite Dependency and change implementation to api #34

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

FarshidRoohi
Copy link

@FarshidRoohi FarshidRoohi commented Feb 27, 2022

Update com.google.protobuf:protobuf-javalite: 3.11.4 to 3.19.2
Change implementation to api, because api is the correct way to add a dependency in lib and solved many problems and conflicts in other dependencies.

@FZambia
Copy link
Member

FZambia commented Feb 28, 2022

Hello, thanks!

From Gradle docs:

The api configuration should be used to declare dependencies which are exported by the library API, whereas the implementation configuration should be used to declare dependencies which are internal to the component.

This makes me feel that it's not really obvious that libraries should always use api. Could you describe which exact issues you came across and how switching to api solves them?

@FarshidRoohi
Copy link
Author

FarshidRoohi commented Feb 28, 2022

Hi!
I have a problem implementing centrifuge-java and protobuf-kotlin together with them.
because of a big conflict in protobuf-java and I try to many solutions for this problem and fix the duplicate class errors.
I read this issue but couldn't help me and I fork centrifuge-java and change implementation to api and implement .jar file in my project and fix my issue and Gradle dependencies conflict.

I add .jar file in the project and implemented com.google.protobuf:protobuf-kotlin:3.19.4 worked and I'm not any problems so I change implementation to api and create a pull request.

If you are a library maintainer you should use api for every dependency which is needed for the public API of your library

Link

@FZambia
Copy link
Member

FZambia commented Feb 28, 2022

Thanks. Do you have a chance to post a minimal example app on Github which reproduces a problem? I never worked with Kotlin and Java is not my day to day language - so detailed instruction on how to build it will also help. Just want to dig into this a bit to get more understanding about an issue.

@VovaStelmashchuk
Copy link

Do you happen to have any update on the PR? The PR is beneficial for the Android project. Because the Android projects use firebase-pref and datastore library, which depend on the photobuff or photobuff-lite libraries, the libraries have a conflict with centrifuge-java. Can you merge the PR or add special lines into the ReadMe file for android folks?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants